<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<button class="btn">切换</button>

		<div id="box" class="cba" title="aaa" style="color: red">哈哈哈哈哈哈</div>

		<script>
			var btnEl = document.querySelector('.btn') // as HTMLButtonElement
			var boxEl = document.querySelector('#box') // as HTMLDivElement

			btnEl.onclick = function () {
				boxEl.hidden = !boxEl.hidden
			}
		</script>
	</body>
</html>
